package com.wyw.design.model.learning.behavioral.command;

/**
 * @Title   客户端
 * @Description
 * @Author Mr Wu yewen.wu.china@gmail.com
 * @Date 2023/4/17 16:30
 * Update History:
 * Author        Time            Content
 */
public class CommandClient {
    public static void main(String[] args) {
        TV tv = new TV();
        Command openTvCommand = new OpenTvCommand(tv);
        Command closeTvCommand = new CloseTvCommand(tv);
        Command changeTvCommand = new ChangeTvCommand(tv);
        TvRemote control = new TvRemote(openTvCommand,closeTvCommand,changeTvCommand);
        control.open();
        control.change();
        control.close();
    }
}
